package seeders

import (
	"github.com/goravel/framework/facades"
	"goravel/app/models"
)

type UserSeeder struct {
}

// Signature The name and signature of the seeder.
func (s *UserSeeder) Signature() string {
	return "UserSeeder"
}

// Run executes the seeder logic.
func (s *UserSeeder) Run() error {
	password, _ := facades.Hash().Make("admin888")
	users := []models.User{
		{
			Name:     "超管",
			Mobile:   "18888888888",
			Password: password,
		},
		{
			Name:     "小李",
			Mobile:   "18888888889",
			Password: password,
		},
		{
			Name:     "林育祥",
			Password: password,
		},
		{
			Name:     "陈美傲",
			Password: password,
		},
		{
			Name:     "黄华秀",
			Password: password,
		},
		{
			Name:     "丁泽军",
			Password: password,
		},
		{
			Name:     "陈锦",
			Password: password,
		},
		{
			Name:     "蓝鹰",
			Password: password,
		},
		{
			Name:     "袖哥",
			Password: password,
		},
		{
			Name:     "海清",
			Password: password,
		},
		{
			Name:     "杨智城",
			Password: password,
		},
	}
	facades.Orm().Query().Model(&models.User{}).Create(&users)
	return nil
}
